﻿using System;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
using Sample.Interfaces;

namespace Sample.Modules.DummyData
{
    public class Module : IModule
    {
        private readonly IUnityContainer _unityContainer;

        public Module(IUnityContainer unityContainer)
        {
            if (unityContainer == null)
            {
                throw new ArgumentNullException("unityContainer");
            }
            _unityContainer = unityContainer;
        }

        public void Initialize()
        {
            _unityContainer.RegisterType<ILibrary, DummyLibrary>();
        }
    }
}
